<template>
<div class="d1">
  <criteria-paged :model="model">
    <criteria partial='criteria' @condition-changed='search'>
      <div novalidate class="inline" partial>
        <div class="form-group">
          <div class="col-sm-5">
            <label for="f_receiver">申请人:</label>
            <v-select :value.sync="model.f_receiver" v-model="model.f_receiver" :options='$parent.$parent.f_name' placeholder='请选择' close-on-select clear-button condition="f_name ='{}'"></v-select>
          </div>
          <div class="col-sm-7">
            <label for="f_startdate">开始时间:</label>
            <datepicker id="f_startdate" width="100px" placeholder="起始时间" v-model="model.f_startdate" v-on:keyup.enter="search" condition="f_startdate='{}'" defaultvalue="'13'" :value.sync="model.f_startdate" :disabled-days-of-Week="[]" :format="'yyyy-MM-dd'"
              :show-reset-button="reset">
            </datepicker>
          </div>
        </div>
        <div class="form-group">
          <label for="f_enddate">结束时间:</label>
          <datepicker id="f_enddate" width="100px" placeholder="终止出发时间" v-model="model.f_enddate" v-on:keyup.enter="search" condition="f_enddate='{}'" defaultvalue="'13'" :value.sync="model.f_enddate" :disabled-days-of-Week="[]" :format="'yyyy-MM-dd'" :show-reset-button="reset">
          </datepicker>
          <button class="btn btn-primary" id="selectbtn" @click="search()">查询</button>
          <!-- <print-file url='rs/sql/getPrintcontent'
                      logicurl='/rs/logic/printfile'
                      userid='1120002568'
                      :top='100'
                      :left='100'
                      :width='600'
                      :height='1000'
                      :rowheight='38'
                      :lines='25'
                      :emptyline='13'
                      :emptylineheight='40'
                      :font-size='12'
                      >打印</print-file> -->
        </div>
      </div>
    </criteria>
    <card-grid :model="model" partial='list'>
      <div class="d2" partial @click="$parent.$parent.$parent.showmodal(row)">
        <span>{{row.f_receiver}}</span>
        <span>已领取{{row.r}}块</span>
        <span>已安装{{row.r1}}块</span>
        <span>已退回{{row.r2}}块</span>
      </div>
    </card-grid>
  </criteria-paged>
  <user-modal :arr='row' :show="show" @replys="w"></user-modal>
</div>
</template>
<script>
import {PagedList} from 'vue-client'
// import PrintFile from '../../src/components/PrintFile'
export default {
  title: '物流信息列表',
  data () {
    return {
      model: new PagedList('rs/sql/selectjl', 20),
      // },
      row: {},
      selectArr: [],
      selectArr1: '',
      show: false
    }
  },
  methods: {
    // selectAll1: function (data) {
    //   console.log(this.selectArr1)
    //   if (!this.selectArr1) {
    //     this.selectArr = []
    //     data.forEach((item) => {
    //       this.selectArr.push(item.f_address)
    //     })
    //   } else {
    //     this.selectArr = []
    //   }
    // },
    showmodal (row) {
      this.row = row
      console.log(1111111111111111111111111111)
      this.show = true
    },
    receive () {
      console.log(this.selectArr)
      console.log('获取到的收据是' + this.model.f_name)
    },
    w (m) {
      this.show = m
    }
  },
  computed: {
    f_name () {
      return this.$getParams('物流公司', [{
        label: '请选择',
        value: ''
      }])
    }
  }
}
</script>
<style>

</style>
